# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Contributor: Ionut Biru <ibiru@archlinux.org>
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>

pkgname=libgee
pkgver=0.20.4
pkgrel=1
pkgdesc="A collection library providing GObject-based interfaces and classes for commonly used data structures"
url="https://git.gnome.org/browse/libgee"
license=(LGPL2.1)
arch=(x86_64)
depends=(glib2)
makedepends=(gobject-introspection vala autoconf-archive git)
_commit=db2efd468d32832ed787165ddda555706d888aca  # tags/0.20.4^0
source=("git+https://gitlab.gnome.org/GNOME/libgee.git#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd $pkgname
  NOCONFIGURE=1 ./autogen.sh
}

build() {
  cd $pkgname
  ./configure --prefix=/usr --disable-static
  make
}

check() {
  cd $pkgname
  # generates a bazillion traps - make sure systemd's core_pattern
  # is deactivated, or you'll DoS the journal and the system
  #make check
}

package() {
  cd $pkgname
  make DESTDIR="$pkgdir" install
}
